package ourGame;

import java.awt.Color;
import java.awt.Graphics;
import java.util.ArrayList;

public class Map
{
	ArrayList<Boundary> bounds;
	public Map()
	{
		bounds = new ArrayList<Boundary>();
		bounds.add(new Boundary(0, 600, 0, 600));
		
		bounds.add(new Boundary(50, 100, 50, 100));
	}
	
	public boolean isValidMove(int x, int y)
	{
		for(int k = 0; k < bounds.size(); k++)
		{
			if(!(bounds.get(k).isValidLocation(x, y)))
			{
				return false;
			}
		}	
		return true;
	}
	
	public void drawMap(Graphics g)
	{
		for(int k = 1; k < bounds.size(); k++)
		{
			g.setColor(Color.cyan);
			g.fillRect(bounds.get(k).getX1(), bounds.get(k).getY1(), bounds.get(k).getX2(), bounds.get(k).getY2());
		}
	}
	
}
